package com.cyou.qb.front.web;

import java.text.ParseException;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.cyou.nad.datastore.query.JdbcPage;
import com.cyou.nad.tag.table.pagebar.PageBar173App;
import com.cyou.qb.common.service.WinnerService;
import com.cyou.qb.front.utils.PassportUtils;

@Controller
@RequestMapping(value="/myqiangba")
public class MyQbController extends BaseController{
	@Resource(name="WinnerServiceCacheImpl")
	private WinnerService winnerService;
	@RequestMapping(value="/index")
	public String index(Model model,HttpServletRequest request, HttpServletResponse response) throws ParseException{
		
		int uCenterId = PassportUtils.getUserId(request, response);
		JdbcPage page = winnerService.pageWinnerDraw(uCenterId, getPageNo(), getPageSize(5));
		model.addAttribute("page",page);
		model.addAttribute("bar",PageBar173App.getInstance());

		return "/activity/myqiangba";
	}
}
